Fixed bugs

closes #2
Merge branch 'hotfix/#2'