misc bugfixes
Merge pull request #1 from joe-wright/master

misc bugfixes