Final fix for #915 : Make sure we flush the buffered bytes