JPM/HM: fixed multithreading issue.