Fixing a small bug on modals