Fixed error when searching for subkey IDs