Fix for dropdown menus appearing during page load