Fixed bug where multiple keys could not be invalidated