Fix invalid parameters for RuntimeException, fix behavior when got SIGTERM

BC break? Not sure, probably not.