fixed saving RData bug