fix checkout branch order