bug fix in core index for exit