Trying to solve phantomjs memory problem