fix issue #610 (with test)

boolean i1 val but i8 storage seems the source of the problem
Do we want to test for the dtype of the result too?