Fixed swap and sanitized macro bug.