Top commanders from both sides resolved a last-minute hitch over paperwork and signed an agreement to formalize the transfer .