fix error where id is redefined