It should be working, or are you just trying to kill the subroutines without killing the main script?