Set up centering before showing modal from hash.