fix version check bug and add more test