Fixed compiler bugs