fixed the skipping of the zeros (skip the zeros instead of the good samples!)