Several mini fixes