picking changes from v3.5.2