Fix parsing of versions