Fixed latest version function