Fix some texture bugs