fixed crashes from threaded texture generation