fix small bugs so that core/ compiles