fixing pickling problems