Fix version checking bug