Index proprly updated once mode is changed.