Fix truth table, unit tests