handle phantomjs error, affecting travis tests