LPS-43952 Reverted to old implementation in order to make sure the fix doesn't cause other regressions