Fix errors in profile.lua