Made it return instead of kill the application, since it (hopefully) will not be in an unsafe state upon termination, thanks to early returning.