fix issue with selecting cells in a table