fixed a small bug with adding materials to items