Fixed bug with is_user function