Some fixes in agenda parsing