Fixed bug in version detection.