Fix SQL error on case_editprofile