fixed duration bug once and for all