Fixed bug when creating profile