Made compatible with latest PyGMi