Added else section to ensure we populate the current table when no data exist there.