few fixes after refactoring