Fixed undefined var notice.
Merge branch 'duration-undefined'