Fix exit app code