Fix bug causing tables to be loaded multiple times