cleanup descriptor handling