Fix runtime problem with zero pointers