Fixed bug which occurred if you tried to read from a position outside of
the allocated file