port 0 hack for the API unit test