fixed logging problems