Fix duration function tests