Fixed extra exception throw after refactoring.