fix bug with date