Fix null pointer/2 fighting compilers bug