fix for firefox, event undefined