fixed database table loading bug