fix r plots