Fix crashes related to boost with commands. Using boost threads instead of standard threads.