gensave: made generated IDs more repeatable