More fixes after refactor