Minor fixes and upgrade foundation 4.1.6