Fixes for type 1 clear key implementation