fixed a bug in cpost and upost