Error thrown when trying to do inline editing in gantt chart grid area

I have a gantt chart on a web page which has a grid with inline editing. Everything works fine the first time the chart is shown. But when I reinitialize the chart with different data, I get this error when I click on one of the fields in the grid so I can perform inline editing on it:

Uncaught TypeError: Cannot read property ‘exists’ of null
at Object.startEdit (dhtmlxgantt.js?v13.0:10)
at Object. (dhtmlxgantt.js?v13.0:10)
at Object.i (dhtmlxgantt.js?v13.0:10)
at Object.t.callEvent (dhtmlxgantt.js?v13.0:10)
at HTMLDivElement.r (dhtmlxgantt.js?v13.0:10)

Please advise as to how I can fix this error. Thank you.

Hello,
It happens because of the bug in the 5.2 version. The inline editors stop working after the reinitialization.
It was fixed in the 6.0.0 version.