fixed bug with date