Fix a small bug with modals and remote content