Fixed the buggy key and shade deletion