Merge "Fix bug in retrieving headless system user mode" into main