Fixed modal animation bug on page load