solve a null bug