Phantomjs: timing fixes