Overriding swap and fixing second pass logic err