Fixes selection flickering on panel click