some cleanup and callbacks for post