fixed some bugs with creating duration based order
fixed calendar