Fix username is undefined when update.