Fix bug with version checking