Fix version check bug