fixed swap problem