Fixed bug with version detection