 However, Robert was the senior partner, and John had to divorce his first wife Amie; his sons Godfrey, John and Ranald by Amie were to be passed over in the succession in favour of any children by the marriage with Margaret.After the capture of the king and death of John Randolph at the Battle of Neville's Cross in 1346, John and Robert worked together taking control of the huge earldom of Moray, bringing MacDonald power into Lochaber and Stewart power into Badenoch.David returned to Scotland in 1357, and resented these incursions into an earldom which David regarded as within his rights of disposal; the terms of the original grant of Moray to Thomas Randolph in 1312 stipulated that the earldom would revert to the crown upon lack of issue.