Fix packaging and pre_packaging