mirroring changes in https://github.com/monarch-initiative/monarch-app/commit/8e6081148b33ad5e87d16e1bebefd82800adf235