Bug fixing the ids