Fix bug in 3D render utilities.