Reverted unused code related to modalOpenedDeferred change