fix patch in apitest