Thanks for the clear response. It helped get the freeze issue fixed but please note that applying the code to msh_spawn_namingmenu crashes the game as it affects the first naming menu.
I applied the fix in cc_shrinerename only. Problem solved.
Can you give me more guidance on the back sprite? For example how exactly do I
Check if the AMP-ID passed in is in the "enemy" region ( >= AMP_FIRST_ENEMY), and if so return the mond_SPRITE_BATTLE sprite, otherwise return the mond_SPRITE_BACK sprite.