Fix behaviour on Boolean value

Fixes #1082