fixed problem around detecting if a sample should be logged