Terminate function added to Kernel