Fix bug with all tables fetching