WIP: BugFix407 + Refactor #41

Draft
jinhaolin wants to merge 6 commits from Bug407-JinHaoLin into Alpha-snapshot20240618

6 Commits (master)