make sure the id doesn't get incremented more than once