Clean up the release flag function.