[DF-2241] fix issue, fix mem leaks