fix bug in date