fixed bug in pickle test