fix a version max bug