Potential fix for Read() issue

By wrapping up the code in curly braces, it seems to have stopped
throwing up this issue, however there are still bugs with the code.