Modal Close

I have a page that has nested modals, ie parent view shows a table of tenants. I click on link to view more details which opens in a modal.  The modal contains a table with a list of associated leases.  If I view more details on an associated lease in another modal, when I close the second modal they are all closed. Is there any way to only close the second modal?