Fix test of undefined variable in Duration widget