Fix wrong date generation