R bug fixed