Fix up phantomjs events and resource tracker events