fixing the multiple modals not dismissing and adding a test