Fixing a bug in vertex swapping that provided the inverse output.