Fixing bug with default date setting