Fixed variable removal bug.