Fix EZP-23152: small refactor