fix phantomjs tests