fixed bug in date