fix safe_url bug