Fixing Table Listener and Table cleanup