fixes for latest foundation lib