Adding and index and a fix