Fix error in get past challenges api.

Fix error in get past challenges api.