change proto idx to uint16