fix date precedence issue