Fixed null bug