Fixed two issues with the material panels.