Changed to support gr 3.7. Probably won't work with older versions now.