Correcting deficiencies in approximate density functionals