fix R argument for second stage