Fixed flickering issue with sidebar