Fixing issues after refactoring.