workaround for EA-49915, EA-50599
(cherry picked from commit c178ebfce89de553206089a989170366a486e573)