Fixed some problems with exits