GUI race condition fix