fixes for using cPickle