Implement function unregistering