fixed a bug with user existence checking