attempt to resolve goroutine leak reported in #77; better state management related to lost tasks