fix user undefined bug