fix some mgf stuff