correct null pointer remove