fixed bug in post id check