Fixed a bug with the insert_bulk method

...thanks to Guillermo