fix tests to deal with kill functions