Merge branch 'before-swap-callback'