fixed a bug that frees FreePostDesc(pd) too soon.