fix variable usage in User class