improved npe protection