fix bug when projecting spectra larger than xyrange