Quick and dirty workaround for a race condition