patch to not use Thread.getId()