fix bugs with mgof