Add modal hiding function