No longer use output buffer for redirect, this was causing some strange side effects.