fixed joins. cannot get logging to work