fix refactor related compile errors