fixing some bugs in post creation