important bugfix for shaping durations more accurately