Hanging problem seems fixed by making sure things get closed