Make duration default to 0 for failure cases