Fix corruption of weights filename specified in the browser gui.