Fixing empty table, graph bug when first loaded