Move ci_exit() up