Fixed no check for allow redirect or not.