Fixed js for Firefox