get things cleaned up to run with errors