Fixed doRead thanks to Mike Kazantsev