Fix a bug with long_poll