fixt bug TDIS-6521 and TDIS-5798