Fixed in-statement swapping issues