Fixing all_after_pass logic