Fixed fatal bug with todo id generation