fixed ondemand dates bug