Fixed threading by an ugly way