Clean up for properly ending handlers