Fixed typo in smartIdx