adoption agency algorithm fixes