fix close sidebar bug