Fix issues #41 and #42
Merge pull request #43 from treilly-nuodb/master

Fix issues #41 and #42