fix minor issues with the refactoring