bug fix mat data reader