eqn: handle missing closing brackets