Integrated 56812d2255d7c4ebd711e8aad8c603be01158915 from M1cha:
add dualsystem support