uses of buckets returning lastrowid, now uses the returned row instead