Fix integer usage in takeback detection