SetPortrait functions not working?

I can’t seem to get either SetPortraitResRef or SetPortraitID functions to work properly on an NPC. The portrait becomes the shrouded figure non-portrait instead of the proper one. Is this a known bug? I’m using the latest stable EE toolset by the way.

They work correctly for me on 8193.5. Can you post your script?

I’m still not entirely sure what the issue is. I had the function as a part of a somewhat convoluted process of creating custom polymorph behavior. It works perfectly fine outside of that, so I’m guessing there’s just some erratic behavior when trying to change both appearance and portrait at the same time? Moving the portrait changing bit to a separate wrapper function solved the problem.