Final fix for null bug