Fix delete and multi index problems