Fixed crash with npt.py