fix typo, add swap support