fixed a bug in Zpost()