Fixing index/entity errors