Bug fixes:

* Fixes #14
* Fixes #13
* Fixes #11
Merge branch 'dev'