Material comparison now works with ID.
Attempt to fix erros due to hardcoding.