fix a version check bug