Fix table selector varible leaking