fix long pooling bugs