Corrected bug in __index