fixed missing tables bug