use 'continuation' instead of 'defer', improve code

Signed-off-by: zensh <admin@zensh.com>