merged all relevant changes from ASM r1710