The types in the list are strings, so they won't match a key. Remove the pin from the prim when removing the script.