Fixes the bug where the profile was not added when finished.