fixed logging problem