Fixed reader issue when file contains multiple definitions