Removed unnecessary class casting in EventPanel: