Merged fixes from branch 1.3.x