Bug fix (multiple entities got the same id).