fixed problem with disconnections and xhr-polling