Fixed the character reuse issue in the engine