Id calculation was not correct