Fixed sidebar not closing on shutdown