Fixed issues introduced with recent refactorings.