Fixing errors for loading data