Fix for detection of correct version