Fix bug in profile.js