bugs with import R fixed