Added null pointer changes