Fixed phantomjs hanging