fixed read error for some fits files