fixing bug in doEventForPlayer