修复NullPointerException