Fixed the Firefox closure issue.