fixed reg to regS so it compiles