Fixed bug with handling EventListener objects.