fix a bug in dump pickle
avoid different type...