fixed bug in read()