fix a bug in Rlearner