Adding pickle compatibility