Pulled in some changes from v1.65