fix date sorting