fix output grammar