Fixed compatibility with gr 3.7.1 api

compiles fine, not fully tested.