cleanup handling of '%'