Fixed key re-enabling code