fix problem with date representation