Fixed Undefined values for boolean images

- Fixed #48