fixed bug in descriptor writer