update swap handles special cases