Add unit test for hanging kill + fix other tests behaviour