Fixed UI vs blocking-thread error