fixed result swapping