Fixed refactoring issues.