more incremental fixes for #142
Merge pull request #197 from ndawe/master

more incremental fixes for #142