bug with using phpQuery which has to do constructing document by calling pq(). fixed by calling unset() at the end of using the parser