Fixed redirect and flash.