Fix error
Merge pull request #1 from kolonist/master

Fixed error in logic