cleanly handle the local key in the ret