Implementation of KGW Exploit Fix.

Implementation of KGW Exploit Fix.