fix bug in check_user