Fixed delete texture issue and deadlock