Since each swap has to be written on the blockchain, there is a delay and the price can change during that time. Use the advanced settings before a swap to set your price slippage tolerance.