fix the exception thrown when the command exit with -1.