fixing the crash in profile page