Exiting bug fix