Better handling of incorrect keys