add a buffer to resultCh & cosmetic fix

As per my comments (except I didn't change the signature of the timeout function).