Fix the error with repeating a terminal symbol