fixes #39: corrected && and || behaviour