bugfix: don't take null as id: 0