merge 5674:5682 and 5689-5694 from mixbus branch