Optimize convert key method of package converter