fixed: exit does not work under iOS