fix backend checking

Fixes the following bug
```r
Warning message:
In if (tolower(backend) == "ramp") { :
  the condition has length > 1 and only the first element will be used
```