Fix table being removed from list after save

This PR would fix these two issues that are related.

- **Table disappear from list** #467
- **Error loading page after saving settings** #482