minor null bug fixed