fix undefined user crash bug.