fix broken swap