Fixing an id bug