fixes an infinite loop... also, it extracts one stack per call, not all of the available ones.