constraint crash fix and breaking conditions fix (were evaluated incorrectly)