fix pooling bug