Fix bug send thread falling asleep while still commands left to process