Merge "Fix race condition with preview callback." into jb-dev