Fix eventClass and FirstController type casting