Minor changes and bugfixes
Merge pull request #266 from wagnert/master

Minor changes and bugfixes