Fixed #214 causing endless loop in updateIndex()

Added `else` branch for preventing endless loop.