fixing syntax error in exchange_code