fix package preparation issues