Fixed the gref functions to get mfns internally