Fixed the problem when user try to add a new material if the first one doesn't fill up the amount of needed material.