Almost fixed bug I think... has to do with durationHasChanged function.