fix for datepicker error