fix problem with Date