cleanup before posting