Fixes Material class
Fixes way of version checking in Material class
Merge changes from master