Multiple-layered modal popups

I have a form within a modal popup where we have added the ability to "add a new option" for each field. Previously, if you click to add a new option, this modal popup would appear in front of the main modal popup. Now, it is appearing behind and I can't figure out why it is doing so/how to fix it.

This is happening across my entire app- another example: after clicking into a pie chart and displaying detailed records in a modal popup, the filter menu that would previously appear in front now appears behind the popup as well. Any help is greatly appreciated!