Fixed read statement bugs