Fixed bugs with duration method.