fixed execution error: The variable theDate is not defined. (-2753)