fix inityaamregs not to destroy global structures.