Merge pull request #216 from stevenvanrossem/master

several bug fixes and updates