fix bugs inserting and deleting rows
using TYPE_SAFEBUF parms.