Merge pull request #1 from m-kyle/bugfixes

Merge bigfixes and bugfixes