small fixes to profile.js