made a fix for event priority problems.