whoops, bad logic on temp table check