Fixed flaws redirect code, which was not being used.