Fixed swapping issue