Fixed error with read()