adoption agency algorithm bug fixes