fixed minor indexing issue