Remove thread since it seems to cause trouble on the pi