fix strings within nested brackets