Bug fix to version retrieval
Fixed bug