Date-related fixes