- make code more robust against versions of nsf/nx
- fix typo