fixes firefox open-close bug