Bug fixes (javascript on the "addResult" page)