Added support to allow bulk api to work correctly