Add some ugly logic for filling in the truth table correctly.