improve out of scope errors