Fix Material target
Fix warnings