Block time issue (Deleting)

Sorry for my english.
I have an issue when I block all the time.

		scheduler.addMarkedTimespan({
			days:  [0,1,2,3,4,5,6],
			zones: "fullday",
			css:   "blockTime",
			type:  "dhx_time_block"
		});

Then unblock some sections of time.

scheduler.deleteMarkedTimespan({
	days:  3,
	zones: [60,420],
	type:  "dhx_time_block"
});

Then try to unlock some days. (Fullday)

scheduler.deleteMarkedTimespan({
	days:  3,
	zones: "fullday",
	type:  "dhx_time_block"
});

The following error occurs.

TypeError: related_zones is undefined
for (var k=0; k<related_zones.length; k++) {

To fix this I changed lines 755-761 (of dhtmlxscheduler_limit.js)

var related_zones = scheduler._marked_timespans_ids[d_t.id];
for (var k=0; k<related_zones.length; k++) {
	if (related_zones[k] == d_t) {
		related_zones.splice(k, 1);
		break;
	}
}

To

var related_zones = scheduler._marked_timespans_ids[d_t.id];
if(related_zones){
	for (var k=0; k<related_zones.length; k++) {
		if (related_zones[k] == d_t) {
			related_zones.splice(k, 1);
			break;
		}
	}
}

Now everything works.
Maybe I’m wrong - correct me please.

Hello,

Thank you very much for taking your time to inform about this problem. That was very helpful!
We’ve fixed it a bit different way though.

Kind regards,
Ilya