Fixes for R test