fixed bug in saveGm function on python side