fixes and improvements
Merge pull request #1 from biemond/fixes

fixes and improvements