fixed bug in profile controller