Remove unneeded code that misplaced table selection