Fixing the redirect_document method call