Changed variable scope in parsears to avoid leaks