Fixes exiting