Close GH-26: Fix deadlock when restore stream is not used. Fix #19. Fixes #19