Fix an error where a promise could have been rejected after it has already been resolved
v1.0.2
restore new lines in phantomjs stream