Proper calculation of the app latest version