fix compareVersion check