corrected the variable name for post id