bug fixes all around
Merge branch 'newdb' of https://github.com/kpurdon/OPS into newdb