Fix for multitherad opt