Bug fix for R example.