threads: fix issue with setting main-core to 0