fix error when swap percentage is less than 1