Merge 1.2.17 fixes on 1.3.x