Fix warning: assigned but unused variable - id