Fixed some bugs
Merge pull request #75 from CarlRapp/master

Update