using shim to work around exception