fix some compile-time errors introduced by previous refactoring