fixing bug in instance file reading