fix phantomjs bug