Small fixes after refactoring