Better id handling