Fixed Exit Bug