Fix parsing of version number