Fixed fetching from tables using fetch_array and logging of fetching errors