First small step towards a full implementation of the filtering algorithm #3. Filter shouldn't hang indefinitely anymore.