Bug correction: wrong key used