Fixing a bug regarding the SamplerThread. It should be enabled only if the --profile is used