merged with v1.2 branch

see also # commit: cc1ea022b82bd66ed0dd10eb88dd6206e0d852c1 on v1.2 branch