Fixing bug in sidebar