fixed logging call bug