added key format fix method