Fixing bugs that did not avoid R-related code when using R is set as FALSE in the config file.