Swap Protocol bug fixes