fix bug causing failure in Firefox