minor cleanup before a branch