v3.1.3 merge conflict fix
merge (conflict fixed) with v3.1.3 branch