Swap operation in the presence of Zeeman inhomogeneity in coupled quantum dots