Fixes after refactor