Fixed some code for Aqsis, Pixie and RenderDotC compatibility