Changed the order of swapping decisions