fix transition func grammar