grextras: fixes and python hooks math blocks