Fixes for #255 + tests
#255 changes after review from Jon
Merge pull request #283 from aodn/issue255

Fixes for #255 + tests