fixed a minor file read bug