fixed swap error