[DF-2717] Fix misprint
[DF-2452] Refactor non-obvious code