fixed bug in creating posts error