Fixed the issue with the disappearing modal