fix get max valid version from commit log