fixing uncaught exception in nmbs