Made sure swapping only happens on server