fix nil null issue