Fix for appbar not closing