bug fix with eventLength