fix memory pool