fixed bug w/swap