Bug fixes for the Foundry framework.