fixing rvi logic...