swap.c mix up corrected. Untested