fixed issues with phantomjs