Fix compile errors after refactor