Fixes to kill daemon script.