Merge pull request #148 from jwendl/master

Fixing bugs
Merge pull request #40 from Magenic/master

Merge pull request #148 from jwendl/master