bug fix: forgot an nboolean reference; added some tests