Fixed NPE that occurred when tables were clicked on.