Fix error in which the read statements always failed.