Some ordering fixes in ndb recipe