toolbar auto close bug fix