cleanup prior to branch