minor fixes for long-polling server