remote: better handling of key error