setrenderstate fix