Fixed minor bug from refactoring.