fixes most condition feature except for 1 test