Fix bug of id variable