fix deprecated key_exists uses