Corrected boolean handling
Merge pull request #1 from Polve/fixes

Corrected boolean handling