logical arrays handled correctly (is a logical and has int value 2? seriously?)