fix laterthan, Redmine #6530