fixing modals bug