Fix for the problem that SDL applications exited