Fixes to make gl trace work.