fix NSM initialization.

Possible segfault on startup if NSM is not used.