Make sure synchronized commands are actually executed in mainthread.