Merge pull request #1 from m-kyle/bugfixes

Merge bigfixes and bugfixes
Merge pull request #2 from m-kyle/bigfixes

Merge into master