fix workspace add_by_index