Fix bug where the background polling would not be resumed in case of an exception.