Bug fix for loading and new tests