fixed issues with sidebar its not perfect but good enough for the moment