fix bug when there is no user