Fixed some tex- and date-related bugs