Fix version checking code to accept higher versions