Fixed unable to auto exit app