Fixing broken key replacement.