Fixed infinite loop bug- Was attempting to see if a non-closured state and a closured state were equal, almost never were.