fixed a few bugs in nbrs modeling

I had hoped to push this in with the last pull request. I found a few bugs.