If the cross-country heterogeneity in productivity is more important than the heterogeneity in government quality, it can be optimal to give more foreign aid to more corrupt countries.