Fixing bug: use correct index to find os dist version