Unique ID generation going wrong

incremental counting database objects in bubble is hard (see this)