Fixed bugs with data loaded, with unit tests.