fix sql error on user account page