Simple correction to bandgap problems in IV and III–V semiconductors: an improved, local first-principles density functional theory