Merged changes from MRender.