fix premature phantomjs halt