Make compatible with R17
Merge pull request #79 from cybergrind/dev_r17

Make compatible with R17