fixed logging issues