fix logic if no swap is present