error with dates should be fixed