Fixed some issues that remained from the refactoring.