fix for last race condition