fix a bug caused by hiding the right sidebar