Shunting yard fixes