alot of fixes to update material