collapse log and other minor adjustments