fixed redeeming code bug