Fix two bugs with shading