fixed a small bug in reading the  file