fixed error while reading band gaps for spin polarized calculations