Applied (with some modifications) patch to set the micalg parameter