Copypasta from ispass12p version.