fixed a bug when user is empty