Fix hoes and add mg support.