fixing semantic backtracks
test case