Instabilities in natural-convection flows in cavities