small bug fix in extractToAs which was ignoring situations in which first impulse above threshold was the correct one