fix issue KT-5234: add more tests, revert unnecessary changes