fixed foreign key in profile view