TESB-8373, minor refactor