Fixed phantomjs halting on errors