handling incorrect context errors during make_local call