Fix a load of issues with materials deadlocking stuff. Disable Debug which seems totally broken