Fix Z-flag logic in ALU