engine: fixed big small bug in SWAP macro. thanks to Jonathan N. for spotting this!