fixed all compiler bugs for spectral