remove unnecessary brackets around url