fix bug in agenda