Fixed ordering for grammar actions so that the correct value is displayed