Fixes for new version of Stacks