Added condition for version detection