fix distribution generation