fixed up memory issue with pools