[fix][compiler] fix various compiler bugs