Remove memory leakage/optimize name deprotection