Fix a bug that lead to accept all string as a Perf event.