fixed build indexing