Fix for clicoutside event