TROIA-323 small refactoring.