Tried to solve the fucking bug. Id is set to wrong value sometimes. Got to figure out why and when.