Add the kill action
Fix a bug in dealing function