Merged in latest changes from v1.65