Fix pacakge installation order