Fixed a bug in the swap methods.