fixing R dependency