Add function to fix bad dates