bug fixe: bad handling negative duration values