better Sidebar opening handling