NPEs cleanup

Just a cleanup of potential NPEs in the core