Error for max events and fix bug

Error for max events and fix bug for the string split