minor patches for npe