buffered channel fixes deadlock