handle a size of zero when inserting data