fixed bug with reference_id for bacth call