fix distribution preperation issues