Fixing the modal function (Modal Stable)