fix the bug that can not restore gender