Fixed bug with profile validation