js on profile page loading correctlt