fix vector indexing deprecation warnings