fixed zachs null pointer