Fixed bug in invitation redeeming logic.