Tweaks fro multithreading