fixing id bug