fix posts generate bug