Update to Foundation 5.2.2 Custom

Update to Foundation 5.2.2 Custom as well as other minor fixes