Bugfixes for last update of auto-swap.