Fixes a race where multiple threads were writing to the same  channel

and they all called channel.position(position) / channel.write(data),
whereas they now call channel.write(data, position)