fix handling events for scripting mode and displaying infinite duration in controls