Fix race condition in preview detail panel