Better modal hiding on page load