minor api change with xcp_supply to get_xcp_supply, and some bug fixes