Minor changes to npe detection and denied commands