Fix ray geometry.
Fix dirty flag propagation.