diff --git a/src/main/java/org/commcare/cases/entity/AsyncEntity.java b/src/main/java/org/commcare/cases/entity/AsyncEntity.java index 133a3a088..d51fe837c 100755 --- a/src/main/java/org/commcare/cases/entity/AsyncEntity.java +++ b/src/main/java/org/commcare/cases/entity/AsyncEntity.java @@ -132,6 +132,11 @@ public String getNormalizedField(int i) { @Override public String getSortField(int i) { + synchronized (mAsyncLock) { + if (sortData[i] != null) { + return sortData[i]; + } + } try (Closeable ignored = mEntityStorageCache != null ? mEntityStorageCache.lockCache() : null) { //get our second lock. synchronized (mAsyncLock) {