Fix a JavaScript issue in Firefox