fix for bugs on date