fix when ``rp`` is 0