fixing disconnect error and dequeuing timedout callbacks