bug in read