A man who gained national media attention by claiming he was not allowed to adopt a baby because of his weight was awarded temporary custody of the child, but the judge chided him and his wife, saying they knew the primary reason the boy had been removed from their home had nothing to do with obesity.

Gary and Cindy Stocklaufer had violated adoption law when they failed to obtain some required paperwork when the baby was moved into Missouri from another state, Jackson County Circuit Judge John R. O’Malley said in his order, which he made public Tuesday.