Merge pull request #244 from skrenek/master

Bug fixes.