Fix ivalid parameters for RuntimeException, fix behavior when got SIGTERM signal